type AnimalEx = { name: string };
type DogEx = AnimalEx & { breed: string };

let dogHandler = (dog: DogEx) => {
  console.log(dog.breed);
};
let animalHandler: (animal: AnimalEx) => void = dogHandler;
